package com.pw.web.service.ipml;

import com.pw.web.bean.C3;
import com.pw.web.bean.Spu;
import com.pw.web.bean.Tm;
import com.pw.web.mapper.ProductMapper;
import com.pw.web.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: linux_future
 * @since: 2022/3/29
 **/
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    ProductMapper productMapper;

    @Override
    public BigDecimal getGMV(int date) {
        return productMapper.getGMV(date);
    }

    @Override
    public List<Tm> getProductByTrademark(int date, int limit) {
        System.out.println("date:"+date+" limit: "+limit);
        return productMapper.getProductByTrademark(date, limit);
    }

    @Override
    public List<C3> getProductByC3(int date) {
        System.out.println("date c3==="+date);
        return productMapper.getProductByCategory3(date);
    }

    @Override
    public List<Spu> getProductBySpu(int date) {
        System.out.println("spu ===="+date);
        return productMapper.getProductBySpu(date);
    }

}
